import screens.screen
from pygameExt import pygameext
from data import itemscollection, items
import pygame
from pygame.locals import *
import os

class graphicsScreen(screens.screen.screeninherit):
    """A graphics Screen is a screen that has graphics,
    For example the title screen is a graphics screen.
    And so is the ending screen."""
    def __init__(self, screen, image, characters, screenname=""):
        self.image = image
        self.screen = screen
        self.screentype="graphicsScreen"
        self.nextscene=0
    
    def init(self):
        self.screen.fill((0,0,0))
        background=pygame.image.load(os.path.join('..','data', 'images', self.image))
        self.screen.blit(background, (0,0))
        self.keylisteners = [screens.screen.keyListener([items.heidi,items.heibert], 'action', self.next)]
        pygameext.Ezwrite("Press Space to Continue", self.screen, 24, 400, 550, 200, 30)
    
    def next(self, character):
        self.nextscene = 1
        
    def loop(self):
        return